<?php
declare(strict_types=1);

namespace LowCode\Naive;

use LowCode\Naive;
use LowCode\Support\JsExp;

/**
 * Divider分割线组件
 * @method static static make(mixed $children = null) Divider分割线组件
 */
class Divider extends Naive
{
    public function __construct(mixed $children = null)
    {
        parent::__construct();
        $this->children($children);
    }

    /**
     * 是否使用虚线分割
     * @param bool|JsExp $bool
     * @return $this
     */
    public function dashed(bool|JsExp $bool = true): static
    {
        return $this->prop("dashed",$bool);
    }

    /**
     * 标题的位置
     * @param string|JsExp $placement 'left' | 'right' | 'center'
     * @return $this
     */
    public function titlePlacement(string|JsExp $placement = 'center'): static
    {
        return $this->prop("title-placement",$placement);
    }

    /**
     * 是否垂直分隔
     * @param bool|JsExp $bool
     * @return $this
     */
    public function vertical(bool|JsExp $bool = true): static
    {
        return $this->prop("vertical",$bool);
    }



}
